const getters = {
  // menuTheme: state => state.app.menuTheme,
  // sidebar: state => state.app.sidebar,
  // fixedHeader: state => state.app.fixedHeader,
  // navMode: state => state.app.navMode,
  // device: state => state.app.device,

  isShowTags: (state) => state.app.isShowTags,
  isCollapse: (state) => state.app.isCollapse,
  layoutSize: (state) => state.app.layoutSize,
  themeColor: (state) => state.app.themeColor,
  themeStyle: (state) => state.app.themeStyle,
  systemLogo: (state) => state.app.systemLogo,
  systemTitle: (state) => state.app.systemTitle,
  greetings: (state) => state.app.greetings,
  noticePushQueues: (state) => state.app.noticePushQueues,
  lookHereData: (state) => state.lookHere.lookHereData,
  linkVideoData: (state) => state.linkVideo.linkVideoData,
  noticeRedirectQueues: (state) => state.app.noticeRedirectQueues,
  noticeRedirectQueueData: (state) => state.app.noticeRedirectQueueData,
  noticeQueuesIframes: (state) => state.app.noticeQueuesIframes,
  commonNoticePushQueues: (state) => state.app.commonNoticePushQueues,
  commonNoticeQueuesIframes: (state) => state.app.commonNoticeQueuesIframes,
  systemSocketData: (state) => state.app.systemSocketData,
  splitScreenRouting: (state) => state.app.splitScreenRouting,
  dialogVideoRouting: (state) => state.app.dialogVideoRouting,
  allowUrls: (state) => state.app.allowUrls,

  routes: (state) => state.app.routes,
  currentRoute: (state) => state.app.currentRoute,
  visitedViews: (state) => state.tagsView.visitedViews,
  cachedViews: (state) => state.tagsView.cachedViews,
  queuePages: (state) => state.tagsView.queuePages, // queuePages

  token: (state) => state.user.token,
  avatar: (state) => state.user.avatar,
  name: (state) => state.user.name,
  userType: (state) => state.user.userType,
  introduction: (state) => state.user.introduction,
  roles: (state) => state.user.roles,
  permissions: (state) => state.user.permissions,
  // 验证权限 role为权限标识数组或标识单标识字符串
  auth: (state) => (role) => {
    const { permissions } = state.user;
    if (typeof role === "string") {
      return permissions.includes(role);
    } else if (Array.isArray(role)) {
      return permissions.some(
        (item) => item === "*.*.*" || role.includes(item)
      );
    } else {
      return false;
    }
  },
  deptInfo: (state) => state.user.deptInfo,
  blocDeptInfo: (state) => state.user.blocDeptInfo,
  userInfo: (state) => state.user.userInfo,
  isCloseVideoListen: (state) => state.lookHere.isCloseVideoListen,
  userDeptTreeOptions: (state) => state.user.userDeptTreeList,
  downloadNum: (state) => state.user.downloadNum,
  tradeVersions: (state) => state.user.tradeVersions,
  tradeVersionsNew: (state) => state.user.tradeVersionsNew,
  isTT: (state) => state.user.isTT,
  towerFloatWinow: (state) => state.user.towerFloatWinow,
  tenantFloatWindow: (state) => state.user.tenantFloatWindow,
  switchStatus: (state) => state.user.switchStatus,
  protocolType: (state) => state.user.protocolType,
  protocolTypeNew: (state) => state.user.protocolTypeNew,
  industry: (state) => state.user.industry,
  netType: (state) => state.user.netType,
  pluginNetType: (state) => state.user.pluginNetType,
  showVerifyLogin: (state) => state.user.showVerifyLogin,
  banner: (state) => state.user.banner,
  flvHasAudio: (state) => state.user.flvHasAudio,
  digitalRobotSwitch: (state) => state.user.digitalRobotSwitch,

  deptOptions: (state) => state.depts.deptOptions,
  areaOptions: (state) => state.depts.areaOptions,
  blocDeptOptions: (state) => state.depts.blocDeptOptions,
  obsInfo: (state) => state.depts.obsInfo,

  showRightView: (state) => state.video.showRightView,
  showAlgorithmView: (state) => state.video.showAlgorithmView,
  playWindowNum: (state) => state.video.playWindowNum,
  doDrawing: (state) => state.video.doDrawing,
  videoSettingId: (state) => state.video.videoSettingId,
  watermark: (state) => state.video.watermark,
  recordDownloadShow: (state) => state.video.recordDownloadShow,
  recordDownloadDatas: (state) => state.video.recordDownloadDatas,
  video3dSetting: (state) => state.video.video3dSetting,
  videoPlayer3dSetting: (state) => state.video.videoPlayer3dSetting,
  automaticEnlargedImages: (state) => state.video.automaticEnlargedImages,
  devicePermissions: (state) => state.video.devicePermissions, // 设备权限
  deviceTurnOptions: (state) => state.video.deviceTurnOptions, // 摄像机转动
  // socket
  currentNeedAlertMsg: (state) => state.socket.currentNeedAlertMsg,
  globalOptions: (state) => state.options.globalOptions,
};
export default getters;
